home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / em-xmkit.zip / EMM19_B.ASM < prev    next >
Assembly Source File  |  1989-11-29  |  5KB  |  94 lines

  1. ;-----------------------------------------------------------------------------;
  2. ;      MODULE NAME:   EMM19_B.ASM                                             ;
  3. ;                                                                             ;
  4. ;    FUNCTION NAME:   set_handle_attrib                                       ;
  5. ;                                                                             ;
  6. ;      DESCRIPTION:   This function can be used to modify the attribute which ;
  7. ;                     a handle has associated with it.  The attributes which  ;
  8. ;                     a handle may have are volatile or non-volatile.         ;
  9. ;                                                                             ;
  10. ;                     If the handle's attribute has been set to non-volatile, ;
  11. ;                     the handle, its name (if it is assigned one), and the   ;
  12. ;                     contents of the pages allocated to the handle are all   ;
  13. ;                     maintained after a warm boot.  However, this function   ;
  14. ;                     may be disabled with a user option, or may not be       ;
  15. ;                     supported by the memory board or system hardware.       ;
  16. ;                                                                             ;
  17. ;                     A volatile handle attribute instructs the memory        ;
  18. ;                     manager to deallocate both the handle and the pages     ;
  19. ;                     allocated to it after a warm boot.  If all handles      ;
  20. ;                     have the volatile attribute (the default attribute)     ;
  21. ;                     at warm boot, the handle directory will be empty and    ;
  22. ;                     all of expanded memory will be initialized to zero      ;
  23. ;                     immediately after a warm boot.                          ;
  24. ;                                                                             ;
  25. ;           PASSED:   attrib:                                                 ;
  26. ;                        is an open EMM handle's new attribute.  A value of   ;
  27. ;                        zero indicates that the handle should be made        ;
  28. ;                        volatile.  A value of one indicates that the handle  ;
  29. ;                        should be made non-volatile.                         ;
  30. ;                                                                             ;
  31. ;                     handle:                                                 ;
  32. ;                        is an open EMM handle.                               ;
  33. ;                                                                             ;
  34. ;         RETURNED:   status:                                                 ;
  35. ;                        is the status EMM returns from the call.  All other  ;
  36. ;                        returned results are valid only if the status        ;
  37. ;                        returned is zero.  Otherwise they are undefined.     ;
  38. ;                                                                             ;
  39. ; C USE CONVENTION:   unsigned int status;                                    ;
  40. ;                     unsigned int attrib;                                    ;
  41. ;                     unsigned int handle;                                    ;
  42. ;                                                                             ;
  43. ;                     attrib = VOLATILE;                                      ;
  44. ;                     status = set_handle_attrib (attrib,                     ;
  45. ;                                                 handle);                    ;
  46. ;-----------------------------------------------------------------------------;
  47. .XLIST
  48. PAGE    60,132
  49.  
  50. IFDEF SMALL
  51.    .MODEL SMALL, C
  52. ENDIF
  53. IFDEF MEDIUM
  54.    .MODEL MEDIUM, C
  55. ENDIF
  56. IFDEF LARGE
  57.    .MODEL LARGE, C
  58. ENDIF
  59. IFDEF COMPACT
  60.    .MODEL COMPACT, C
  61. ENDIF
  62. IFDEF HUGE
  63.    .MODEL HUGE, C
  64. ENDIF
  65.  
  66. INCLUDE emmlib.equ
  67. INCLUDE emmlib.str
  68. INCLUDE emmlib.mac
  69. .LIST
  70. .CODE
  71.  
  72. set_handle_attrib    PROC                                                  \
  73.             attrib:WORD,                                          \
  74.             handle:WORD
  75.  
  76.     ;---------------------------------------------------------------------;
  77.     ;   do;                                                               ;
  78.     ;   .   set the current attribute of the specified handle;            ;
  79.     ;---------------------------------------------------------------------;
  80.     MOVE        AX, set_handle_attrib_fcn
  81.     MOVE        DX, handle
  82.     MOVE        BX, attrib
  83.     INT         EMM_int
  84.  
  85.     ;---------------------------------------------------------------------;
  86.     ;   .   return (EMM status);                                          ;
  87.     ;   end;                                                              ;
  88.     ;---------------------------------------------------------------------;
  89.     RET_EMM_STAT    AH
  90.  
  91. set_handle_attrib    ENDP
  92.  
  93. END
  94.